package com.xinshujia.wxxcx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xinshujia.wxxcx.pojos.entity.Alarmeventlog;
import com.xinshujia.wxxcx.pojos.info.AlarmeventlogInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.Date;
import java.util.List;

/**
 * @Author Cui Han
 * @Date 2024/5/17 16:48
 * @Description: TODO
 * @Version 1.0
 */
@Mapper
public interface AlarmeventlogMapper extends BaseMapper<AlarmeventlogInfo> {

    @Select("select * from AlarmEventLog where Time = #{date} and EventType = 3")
    List<Alarmeventlog> selectByTime(Date date);

    @Update("update  AlarmEventLog set `EventType` = 0 where DeviceGUID = #{guid} ")
    void updateLog(String guid);
}
